import { apiHttp } from '/@/utils/axios';
import type { commonResponse } from './common'

export interface activityBaseModel{
  activityBusiName?:string;//	业务类别	string
  assignCode?:string;//	业务类别	string
  activityName?:string;//	建设项目名称	string
  activityNo?:string;//	标段编号	string
  capitalNature	?:string;//资金性质	string
  constrHead?:string;//	项目负责人	string
  constrUnitCode?:string;//	统一社会信用代码	string
  constrUnitName?:string;//	建设单位	string
  contUnitId?:string;//发包单位id	string
  contUnitName?:string;//	发包单位	string
  creationTime?:string;//	建档时间	string(date-time)
  fixedAmount?:string;//	最终合同价	number(double)
  longLatitude?:string;//	经纬度	string
  planEndDate?:string;//	计划竣工日期	string(date-time)
  planStartDate	?:string;//计划开工日期	string(date-time)
  projContName?:string;//	发包方式	string
  projQualName?:string;//	承接单位资质项	string
  projScale?:string;//	工程规模	string
  projTimeLimit?:string;//	约定工期(天)	integer(int32)
  projUsage?:string;//工程用途	string
  projUtakeUnitId?:string;//	承接单位id	string
  projUtakeUnitName?:string;//	承接单位	string
  projectAddr?:string;//	建设地址	string
  projectId?:string;//	id	string
  projectName?:string;//	项目名称	string
  projectNatureName?:string;//	建设性质	string
  contractDate?:string;//合同签订日期	string
  projectNo?:string;//项目编号	string
  projectRegion?:string;//	所在区划	string
  projectTypeName?:string;//	项目分类	string
  projectUsageName?:string;//	项目用途
}

export const getActivityBaseInfoApi = params => {
  return apiHttp.post<commonResponse>({ url: '/activity/baseInfo', params }, { isTransformRequestResult: false });
}

//***返回格式的增加total
interface totalCommonResponse extends commonResponse{
  total: number | null;
}

export const getActivityPersonApi = params => {
  return apiHttp.post<totalCommonResponse>({ url: '/activity/person', params }, { isTransformRequestResult: false });
}

export const getActivitySingleApi = params => {
  return apiHttp.post<totalCommonResponse>({ url: '/activity/single', params }, { isTransformRequestResult: false });
}

export const getActivityBiddingApi = params => {  // 工程招投标
  return apiHttp.post<totalCommonResponse>({ url: '/activity/bidding', params }, { isTransformRequestResult: false });
}

export const getActivityContractApi = params => {  // 合同备案
  return apiHttp.post<totalCommonResponse>({ url: '/activity/contract', params }, { isTransformRequestResult: false });
}

export const getActivityReviewApi = params => {  // 施工图审查
  return apiHttp.post<totalCommonResponse>({ url: '/activity/review', params }, { isTransformRequestResult: false });
}

export const getActivityPermitApi = params => {  // 施工许可信息
  return apiHttp.post<commonResponse>({ url: '/activity/permit', params }, { isTransformRequestResult: false });
}

export const getActivityQualityApi = params => {  // 安全监督信息  	type : 1 质量报监    2 安全报监
  return apiHttp.post<commonResponse>({ url: '/activity/quality', params }, { isTransformRequestResult: false });
}

export const getActivityFinishyApi = params => {  // 工程竣工验收备案
  return apiHttp.post<commonResponse>({ url: '/activity/finish', params }, { isTransformRequestResult: false });
}
